﻿<%@ Page CodeFileBaseClass="AliCMS.Lib.AdminPageBase" %>
<section data-page="order_list" data-title="我的订单">
	<div class="path1"><span>您的位置：</span>我的订单</div>
	<div class="content">
		<table data-ali-widget="grid" class="grid1">
			<thead>
				<tr>
					<th>订单编号</th>
					<th>订单标题</th>
					<th>下单日期</th>
					<th>订单总价</th>
					<th>订单状态</th>
					<th>订单操作</th>
				</tr>
			</thead>
			<tbody>
				<ali:List ID="List" Object="Order" Page="PageNumber" PageSize="PageSizeValue" Validate="True">
					<ali:Record>
						<tr data-id="<%=InnerID%>">
							<td><%=No%></td>
							<td><%=Title%></td>
							<td><%=CreateTime%></td>
							<td><%=Sum%></td>
							<td>
								<%If !Convert.ToBoolean(IsAccepted)%>
									未受理
								<%ElseIf Int32.Equals(IsFinished, 1)%>
									交易完成
								<%ElseIf Int32.Equals(IsFinished, 2)%>
									交易关闭
								<%ElseIf Int32.Equals(IsFinished, 3)%>
									交易完成，并已归档
								<%Else%>
									<%If Int32.Equals(IsPayed, 0)%>
										未付款
									<%ElseIf Int32.Equals(IsPayed, 1)%>
										部分付款
									<%ElseIf Int32.Equals(IsPayed, 2)%>
										已付款
									<%ElseIf Int32.Equals(IsPayed, 3)%>
										部分退款
									<%ElseIf Int32.Equals(IsPayed, 4)%>
										已退款
									<%EndIf%>
									，
									<%If Int32.Equals(IsDelivered, 0)%>
										未发货
									<%ElseIf Int32.Equals(IsDelivered, 1)%>
										部分发货
									<%ElseIf Int32.Equals(IsDelivered, 2)%>
										已发货
									<%ElseIf Int32.Equals(IsDelivered, 3)%>
										已收货
									<%ElseIf Int32.Equals(IsDelivered, 4)%>
										部分退货
									<%ElseIf Int32.Equals(IsDelivered, 5)%>
										已退货
									<%EndIf%>
								<%EndIf%>
							</td>
							<td>
								<%If !Convert.ToBoolean(IsAccepted)%>
									等待受理
								<%ElseIf Int32.Equals(IsFinished, 0)%>
									<%If Int32.Equals(IsPayed, 0) || Int32.Equals(IsPayed, 1)%>
										<input type="button" value="付款" data-operation="Pay">
									<%EndIf%>
									
									<%If Int32.Equals(IsDelivered, 2) || Int32.Equals(IsDelivered, 3)%>
										<input type="button" value="确认收货" data-operation="ConfirmReceive">
									<%EndIf%>
								<%EndIf%>
							</td>
						</tr>
					</ali:Record>
				</ali:List>
			</tbody>
		</table>
		<ali:Pagination Page="PageNumber" PageSize="PageSizeValue" RecordCount="List[RecordCount]">
			<div class="pagination1" data-page-number="<%=PageNumber%>" data-page-count="<%=PageCount%>" data-page-size="<%=PageSize%>">
				<div class="pagination1-left">
					共<b><%=PageCount%></b>页，每页显示
						<select name="PageSize" data-ali-widget="combo">
							<option value="20">20</option>
							<option value="50">50</option>
							<option value="100">100</option>
							<option value="200">200</option>
						</select>条，共<b><%=RecordCount%></b>条记录
				</div>
				<ul class="pagination1-right">
					<ali:FirstPage>
						<ali:Yes>
							<li><span><span class="first disabled">首页</span></span></li>
							<li><span><span class="prev disabled">上一页</span></span></li>
						</ali:Yes>
						<ali:No>
							<li><a href="<%=FirstPage%>"><span class="first">首页</span></a></li>
							<li><a href="<%=PageNumber - 1%>"><span class="prev">上一页</span></a></li>
						</ali:No>
					</ali:FirstPage>
					<ali:CurrentPage Range="5">
						<ali:Yes>
							<li class="active"><span><%=Index%></span></li>
						</ali:Yes>
						<ali:No>
							<li><a href="<%=Index%>"><%=Index%></a></li>
						</ali:No>
					</ali:CurrentPage>
					<ali:LastPage>
						<ali:Yes>
							<li><span><span class="next disabled">下一页</span></span></li>
							<li><span><span class="last disabled">末页</span></span></li>
						</ali:Yes>
						<ali:No>
							<li><a href="<%=PageNumber + 1%>"><span class="next">下一页</span></a></li>
							<li><a href="<%=PageCount%>"><span class="last">末页</span></a></li>
						</ali:No>
					</ali:LastPage>

					<li class="go">
						<input type="text" name="PageNumber" value="1" size="4"><button></button>
					</li>
				</ul>
			</div>
		</ali:Pagination>
	</div>
</section>